    /**
     * @author sahsharm
     */
    
    var ResourceMgtController = (function() {
        
    
        getResources = function(contextId, contextType) {
            ResourceMgtService.getResources(contextId, contextType, getResources_Result);
        }
    
        function getResources_Result(data) {
            var source = $("#resource-info-tmpl").html();
            var template = Handlebars.compile(source);
            $("#resource-list").append(template(data));
            
            //Rating
            $('.resource-rating').raty({
                score: function() {
                    return $(this).attr('data-rating');
                },
                numberMax : 5,
                starOff : "../../assets/img/star-off.png",
                starOn : "../../assets/img/star-on.png",
                starHalf : "../../assets/img/star-half.png",
                halfShow : true,
                width:150,
            });
            
            $('.description').dotdotdot({
		      
	       });
            
        };
    
        return {
            getResources : getResources,
            getResources_Result : getResources_Result
        };
    
    })();
